package com.zenithmind.exam.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zenithmind.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 题库实体类
 * 
 * @author ZenithMind
 * @since 2024-07-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "题库实体", description = "题库信息")
@TableName("exam_question_bank")
public class QuestionBank extends BaseEntity {

    /**
     * 题库标题
     */
    @NotBlank(message = "题库标题不能为空")
    @Size(max = 200, message = "题库标题长度不能超过200个字符")
    @Schema(description = "题库标题")
    private String title;

    /**
     * 题库描述
     */
    @Schema(description = "题库描述")
    private String description;

    /**
     * 分类ID
     */
    @NotBlank(message = "分类ID不能为空")
    @Schema(description = "分类ID")
    private String categoryId;

    /**
     * 创建者ID
     */
    @NotBlank(message = "创建者ID不能为空")
    @Schema(description = "创建者ID")
    private String creatorId;

    /**
     * 创建者姓名
     */
    @NotBlank(message = "创建者姓名不能为空")
    @Size(max = 50, message = "创建者姓名长度不能超过50个字符")
    @Schema(description = "创建者姓名")
    private String creatorName;

    /**
     * 状态（0:禁用, 1:启用, 2:审核中）
     */
    @Schema(description = "状态（0:禁用, 1:启用, 2:审核中）")
    private Integer status;

    /**
     * 题目数量
     */
    @Schema(description = "题目数量")
    private Integer questionCount;

    /**
     * 标签（JSON格式）
     */
    @Schema(description = "标签（JSON格式）")
    private String tags;

    /**
     * 是否公开（0:私有, 1:公开）
     */
    @Schema(description = "是否公开（0:私有, 1:公开）")
    private Integer isPublic;
}
